Skip to content

Plugin Directory: Fix callback for remove_filter call to set import status#590

Closed
timse201 wants to merge 2 commits into
WordPress:trunkfrom
timse201:patch-4
Closed

Plugin Directory: Fix callback for remove_filter call to set import status#590
timse201 wants to merge 2 commits into
WordPress:trunkfrom
timse201:patch-4

Conversation

@timse201
Copy link
Copy Markdown

@timse201 timse201 commented Apr 3, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props timse201, ocean90.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@timse201 timse201 changed the title fix remove_filter fails to remove import status and modernize array key checks Plugin translation import - fix remove_filter fails to remove import status Apr 3, 2026
Copilot AI review requested due to automatic review settings June 5, 2026 12:22
@ocean90 ocean90 changed the title Plugin translation import - fix remove_filter fails to remove import status Plugin Directory: Fix callback for remove_filter call to set import status Jun 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the WP‑CLI plugin translation import command so that the temporary gp_translation_set_import_status filter is correctly removed after import, preventing the “waiting” import status from leaking into subsequent imports within the same process (per meta.trac ticket #8216).

Changes:

  • Use $assoc_args['format'] ?? 'po' and $assoc_args['set'] ?? 'default' for clearer CLI option defaults.
  • Fix remove_filter() to use the same callable ([ $this, '__string_status_waiting' ]) that was used with add_filter().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bazza bazza closed this in d9e06c9 Jun 5, 2026
@timse201 timse201 deleted the patch-4 branch June 5, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants